home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
termsorc.lha
/
Extras
/
Source
/
gtlayout-source.lha
/
gtlayout.i
< prev
next >
Wrap
Text File
|
1995-09-24
|
15KB
|
519 lines
IFND GTLAYOUT_I
GTLAYOUT_I equ 1
**
** GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
**
** Assembler-Include file by Clemens Resanka
** Email: Clemens.Resanka@310-72-26.st.co.at
** I deleted all typedefs and protos....
**
** HERE BE DRAGONS!
** Note to the casual assembly language hacker: I'll make life to you
** as unpleasant as possible if you use the information contained in
** this very document as the sole source of information on how to
** create programs to use gtlayout.library. Read gtlayout.doc, better
** still, learn a decent high level language like `C' first, then read
** gtlayout.doc. Do it twice, and then do it all over again one more
** time.
**
*****************************************************************************
IFND EXEC_TYPES_I
INCLUDE 'exec/types.i'
ENDC
IFND INTUITION_INTUITION_I
INCLUDE 'intuition/intuition.i'
ENDC
IFND UTILITY_TAGITEM_I
INCLUDE 'utility/tagitem.i'
ENDC
IFND INTUITION_GADGETCLASS_I
INCLUDE 'intuition/gadgetclass.i'
ENDC
IFND LIBRARIES_GADTOOLS_I
INCLUDE 'libraries/gadtools.i'
ENDC
*****************************************************************************
; PlacementTypes; where to place a gadget label
PLACE_RIGHT EQU $0002
PLACE_LEFT EQU $0001
PLACE_ABOVE EQU $0004
PLACE_IN EQU $0008
PLACE_BELOW EQU $0010
; AlignmentTypes; how to align text lines in BOX_KIND gadgets
ALIGNTEXT_LEFT EQU $0000
ALIGNTEXT_CENTERED EQU $0001
ALIGNTEXT_RIGHT EQU $0002
ALIGNTEXT_PAD EQU $0003
; TapeDeckButtonTypes; button images available for TAPEDECK_KIND gadgets
TDBT_BACKWARD EQU $0001
TDBT_FORWARD EQU $0002
TDBT_PREVIOUS EQU $0004
TDBT_NEXT EQU $0008
TDBT_STOP EQU $0010
TDBT_PAUSE EQU $0020
TDBT_RECORD EQU $0030
TDBT_REWIND EQU $0040
TDBT_EJECT EQU $0080
TDBT_PLAY EQU $0100
TDBTLAST EQU $0200
; How to align the window opened by LT_Build on the screen
BITDEF ALIGNF,RIGHT,0
BITDEF ALIGNF,LEFT,1
BITDEF ALIGNF,TOP,2
BITDEF ALIGNF,BOTTOM,3
BITDEF ALIGNF,EXTRA_RIGHT,4
BITDEF ALIGNF,EXTRA_LEFT,5
BITDEF ALIGNF,EXTRA_TOP,6
BITDEF ALIGNF,EXTRA_BOTTOM,7
*****************************************************************************
; Generic tags, applicable for several object types
LA_Chars equ TAG_USER+2
LA_LabelPlace equ TAG_USER+3
LA_ExtraSpace equ TAG_USER+4
LA_NoKey equ TAG_USER+30
LA_HighLabel equ TAG_USER+31
LA_LabelText equ TAG_USER+37
LA_LabelID equ TAG_USER+38
LA_ID equ TAG_USER+39
LA_Type equ TAG_USER+40
LA_PageSelector equ TAG_USER+79
LA_LabelChars equ TAG_USER+107
; Storage type tags
LA_BYTE equ TAG_USER+63
LA_UBYTE equ TAG_USER+64
LA_WORD equ TAG_USER+65
LA_BOOL equ TAG_USER+65
LA_UWORD equ TAG_USER+66
LA_LONG equ TAG_USER+67
LA_ULONG equ TAG_USER+68
LA_STRPTR equ TAG_USER+69
LA_FRACTION equ TAG_USER+68
; For use with LT_GetAttributes() only
LA_Left equ TAG_USER+16
LA_Top equ TAG_USER+17
LA_Width equ TAG_USER+18
LA_Height equ TAG_USER+19
LA_LabelLeft equ TAG_USER+114
LA_LabelTop equ TAG_USER+115
; BOOPSI_KIND
LABO_TagCurrent equ TAG_USER+119
LABO_TagTextAttr equ TAG_USER+120
LABO_TagDrawInfo equ TAG_USER+121
LABO_TagLink equ TAG_USER+129
LABO_TagScreen equ TAG_USER+132
LABO_Link equ LALV_Link
LABO_ClassInstance equ TAG_USER+122
LABO_ClassName equ TAG_USER+123
LABO_ClassLibraryName equ TAG_USER+124
LABO_ExactWidth equ TAG_USER+127
LABO_ExactHeight equ TAG_USER+128
LABO_RelFontHeight equ TAG_USER+131
LABO_Object equ TAG_USER+133
LABO_FullWidth equ TAG_USER+135
LABO_FullHeight equ TAG_USER+136
LABO_ActivateHook equ TAG_USER+141
; BOX_KIND
LABX_Labels equ TAG_USER+12
LABX_Lines equ TAG_USER+13
LABX_Rows equ TAG_USER+1
LABX_Index equ TAG_USER+14
LABX_Text equ TAG_USER+15
LABX_AlignText equ TAG_USER+27
LABX_DrawBox equ TAG_USER+11
LABX_FirstLabel equ TAG_USER+44
LABX_LastLabel equ TAG_USER+45
LABX_ReserveSpace equ TAG_USER+72
LABX_LabelTable equ TAG_USER+98
; BUTTON_KIND
LABT_ReturnKey equ TAG_USER+34
LABT_EscKey equ TAG_USER+56
LABT_ExtraFat equ TAG_USER+29
LABT_Lines equ TAG_USER+140
LABT_FirstLine equ TAG_USER+44
LABT_LastLine equ TAG_USER+45
LABT_DefaultCorrection equ TAG_USER+145
LABT_Smaller equ TAG_USER+147
; CYCLE_KIND
LACY_FirstLabel equ TAG_USER+44
LACY_LastLabel equ TAG_USER+45
LACY_LabelTable equ TAG_USER+98
LACY_AutoPageID equ TAG_USER+103
LACY_TabKey equ TAG_USER+118
; FRACTION_KIND
LAFC_MaxChars equ TAG_USER+20
LAFC_Number equ TAG_USER+21
LAFC_LastGadget equ TAG_USER+28
LAFC_Min equ TAG_USER+23
LAFC_Max equ TAG_USER+24
LAFC_HistoryLines equ TAG_USER+59
LAFC_HistoryHook equ TAG_USER+80
LAFC_Activate equ TAG_USER+148
; FRAME_KIND
LAFR_InnerWidth equ TAG_USER+9
LAFR_InnerHeight equ TAG_USER+10
LAFR_DrawBox equ TAG_USER+11
LAFR_RefreshHook equ TAG_USER+117
; GAUGE_KIND
LAGA_Percent equ TAG_USER+36
LAGA_InfoLength equ TAG_USER+70
LAGA_InfoText equ TAG_USER+71
LAGA_NoTicks equ TAG_USER+143
LAGA_Discrete equ TAG_USER+144
LAGA_Tenth equ TAG_USER+144
; INTEGER_KIND
LAIN_LastGadget equ TAG_USER+28
LAIN_Min equ TAG_USER+23
LAIN_Max equ TAG_USER+24
LAIN_UseIncrementers equ TAG_USER+57
LAIN_Incrementers equ TAG_USER+57
LAIN_HistoryLines equ TAG_USER+59
LAIN_HistoryHook equ TAG_USER+80
LAIN_IncrementerHook equ TAG_USER+85
LAIN_Activate equ TAG_USER+148
; LISTVIEW_KIND
LALV_ExtraLabels equ TAG_USER+26
LALV_Labels equ TAG_USER+33
LALV_CursorKey equ TAG_USER+35
LALV_Lines equ TAG_USER+1
LALV_Link equ TAG_USER+7
LALV_FirstLabel equ TAG_USER+44
LALV_LastLabel equ TAG_USER+45
LALV_MaxGrowX equ TAG_USER+77
LALV_MaxGrowY equ TAG_USER+78
LALV_LabelTable equ TAG_USER+98
LALV_LockSize equ TAG_USER+106
LALV_ResizeX equ TAG_USER+109
LALV_ResizeY equ TAG_USER+110
LALV_MinChars equ TAG_USER+111
LALV_MinLines equ TAG_USER+112
LALV_FlushLabelLeft equ TAG_USER+113
LALV_TextAttr equ TAG_USER+138
LALV_AutoPageID equ TAG_USER+103
; LEVEL_KIND
LAVL_Min equ GTSL_Min
LAVL_Max equ GTSL_Max
LAVL_Level equ GTSL_Level
LAVL_LevelFormat equ GTSL_LevelFormat
LAVL_LevelPlace equ GTSL_LevelPlace
LAVL_DispFunc equ GTSL_DispFunc
LAVL_FullCheck equ LASL_FullCheck
; MX_KIND
LAMX_FirstLabel equ TAG_USER+44
LAMX_LastLabel equ TAG_USER+45
LAMX_LabelTable equ TAG_USER+98
LAMX_TabKey equ TAG_USER+118
LAMX_AutoPageID equ TAG_USER+103
; PALETTE_KIND
LAPA_SmallPalette equ TAG_USER+32
LAPA_Lines equ LA_Lines
LAPA_UsePicker equ TAG_USER+137
LAPA_Picker equ TAG_USER+137
; PASSWORD_KIND
LAPW_String equ GTST_String
LAPW_LastGadget equ TAG_USER+28
LAPW_HistoryLines equ TAG_USER+59
LAPW_HistoryHook equ TAG_USER+80
LAPW_Activate equ TAG_USER+148
; POPUP_KIND
LAPU_FirstLabel equ TAG_USER+44
LAPU_LastLabel equ TAG_USER+45
LAPU_LabelTable equ TAG_USER+98
LAPU_AutoPageID equ TAG_USER+103
LAPU_TabKey equ TAG_USER+118
LAPU_Labels equ GTCY_Labels
LAPU_Active equ GTCY_Active
; SLIDER_KIND
LASL_FullCheck equ TAG_USER+22
; SCROLLER_KIND
LASC_Thin equ TAG_USER+62
; STRING_KIND
LAST_LastGadget equ TAG_USER+28
LAST_Link equ TAG_USER+7
LAST_Picker equ TAG_USER+5
LAST_UsePicker equ TAG_USER+5
LAST_HistoryLines equ TAG_USER+59
LAST_HistoryHook equ TAG_USER+80
LAST_CursorPosition equ TAG_USER+105
LAST_Activate equ TAG_USER+148
; TAPEDECK_KIND
LATD_ButtonType equ TAG_USER+86
LATD_Toggle equ TAG_USER+87
LATD_Pressed equ TAG_USER+88
LATD_Smaller equ TAG_USER+89
LATD_Tick equ TAG_USER+139
; TEXT_KIND
LATX_Picker equ TAG_USER+5
LATX_UsePicker equ TAG_USER+5
LATX_LockSize equ TAG_USER+106
; VERTICAL_KIND, HORIZONTAL_KIND
LAGR_Spread equ TAG_USER+6
LAGR_SameSize equ TAG_USER+8
LAGR_LastAttributes equ TAG_USER+46
LAGR_ActivePage equ TAG_USER+58
LAGR_Frame equ TAG_USER+104
LAGR_IndentX equ TAG_USER+130
LAGR_IndentY equ TAG_USER+134
LAGR_NoIndent equ TAG_USER+146
; XBAR_KIND
LAXB_FullSize equ TAG_USER+50
LAXB_FullWidth equ TAG_USER+50
; Applicable for layout handle only
LAHN_Font equ TAG_USER+41
LAHN_AutoActivate equ TAG_USER+42
LAHN_LocaleHook equ TAG_USER+4
LAHN_CloningPermitted equ TAG_USER+61
LAHN_EditHook equ TAG_USER+74
LAHN_ExactClone equ TAG_USER+75
LAHN_MenuGlyphs equ TAG_USER+76
LAHN_Parent equ TAG_USER+83
LAHN_BlockParent equ TAG_USER+84
LAHN_SimpleClone equ TAG_USER+90
LAHN_ExitFlush equ TAG_USER+108
LAHN_UserData equ TAG_USER+116
LAHN_RawKeyFilter equ TAG_USER+142
; Applicable for menus only
LAMN_FirstLabel equ LABX_FirstLabel
LAMN_LastLabel equ LABX_LastLabel
LAMN_LabelTable equ TAG_USER+98
LAMN_TitleText equ TAG_USER + 17000
LAMN_TitleID equ TAG_USER + 17001
LAMN_ItemText equ TAG_USER + 17002
LAMN_ItemID equ TAG_USER + 17003
LAMN_SubText equ TAG_USER + 17004
LAMN_SubID equ TAG_USER + 17005
LAMN_KeyText equ TAG_USER + 17006
LAMN_KeyID equ TAG_USER + 17007
LAMN_CommandText equ TAG_USER + 17008
LAMN_CommandID equ TAG_USER + 17009
LAMN_MutualExclude equ TAG_USER + 17010
LAMN_UserData equ TAG_USER + 17011
LAMN_Disabled equ TAG_USER + 17012
LAMN_CheckIt equ TAG_USER + 17013
LAMN_Checked equ TAG_USER + 17014
LAMN_Toggle equ TAG_USER + 17015
LAMN_Code equ TAG_USER + 17016
LAMN_Qualifier equ TAG_USER + 17017
LAMN_Char equ TAG_USER + 17018
LAMN_ID equ TAG_USER + 17019
LAMN_AmigaGlyph equ TAG_USER + 17020
LAMN_CheckmarkGlyph equ TAG_USER + 17021
LAMN_Error equ TAG_USER + 17022
LAMN_Screen equ TAG_USER + 17023
LAMN_TextAttr equ TAG_USER + 17024
LAMN_LayoutHandle equ TAG_USER + 17025
LAMN_Handle equ TAG_USER + 17025
LAMN_ExtraSpace equ TAG_USER + 17026
; Applicable for window only
LAWN_Menu equ TAG_USER+25
LAWN_UserPort equ TAG_USER+47
LAWN_Left equ TAG_USER+48
LAWN_Top equ TAG_USER+49
LAWN_Zoom equ TAG_USER+50
LAWN_MaxPen equ TAG_USER+52
LAWN_BelowMouse equ TAG_USER+53
LAWN_MoveToWindow equ TAG_USER+54
LAWN_AutoRefresh equ TAG_USER+55
LAWN_HelpHook equ TAG_USER+73
LAWN_Parent equ TAG_USER+81
LAWN_BlockParent equ TAG_USER+82
LAWN_SmartZoom equ TAG_USER+91
LAWN_Title equ TAG_USER+92
LAWN_TitleText equ TAG_USER+92
LAWN_Bounds equ TAG_USER+93
LAWN_ExtraWidth equ TAG_USER+94
LAWN_ExtraHeight equ TAG_USER+95
LAWN_IDCMP equ TAG_USER+96
LAWN_AlignWindow equ TAG_USER+97
LAWN_TitleID equ TAG_USER+99
LAWN_FlushLeft equ TAG_USER+14000
LAWN_FlushTop equ TAG_USER+14001
LAWN_Show equ TAG_USER+14002
LAWN_MenuTemplate equ TAG_USER+14003
LAWN_MenuTags equ TAG_USER+14004
; Private tags; do not use, or you'll run into trouble!
LA_Private1 equ TAG_USER+100
LA_Private2 equ TAG_USER+101
*****************************************************************************
; Identifies the absence of a link for a listview or a string gadget
NIL_LINK equ -2
*****************************************************************************
* String gadget type history hook support: you will either get
* the following value passed as the message parameter to your
* hook function, or a pointer to a null-terminated string you should
* copy and create a Node from, which you should then add to the tail
* of your history list. Place a pointer to your history list in the
* Hook.h_Data entry.
HISTORYHOOK_DISCARD_OLDEST equ 0 ; Discard oldest entry
*****************************************************************************
* Incrementer hook support: you will get the current value
* passed as the object and one of the following values as
* the message. Return the number to be used.
;IncrementerMsgTypes
INCREMENTERMSG_DECREMENT EQU -1 ;Decrement value
INCREMENTERMSG_INITIAL EQU 0 ;Initial value passed upon gadget creation
INCREMENTERMSG_INCREMENT EQU 1 ;Increment value
*****************************************************************************
* Help key hook support: the hook will be called with a "STRUCTURE IBox *"
* as the object and a "STRUCTURE HelpMsg *". The IBox describes the object
* the mouse was positioned over, such as a button, a listview, etc.
* The "ObjectID" will indicate the ID of the object the mouse was
* positioned over. The ID will be -1 if no object was to be found.
STRUCTURE HelpMsg,0
APTR Handle; ; Window layout handle
LONG ObjectID; ; ID of the object, -1 for full window
LABEL HelpMsg_SIZEOF
*****************************************************************************
* Refresh hook support: you will get the following structure
* passed as the message and a pointer to the LayoutHandle as
* the object.
STRUCTURE RefreshMsg,0
LONG ID
WORD Left,Top,Width,Height
LABEL RefreshMsg_SIZEOF
*****************************************************************************
; Obsolete tags, don't use in new code
LA_Lines equ LABX_Rows
LA_Spread equ LAGR_Spread
LA_SameSize equ LAGR_SameSize
LA_FullCheck equ LASL_FullCheck
LA_ExtraLabels equ LALV_ExtraLabels
LA_LastGadget equ LAFC_LastGadget
LA_SmallPalette equ LAPA_SmallPalette
LA_Labels equ LALV_Labels
LA_Picker equ LATX_Picker
LA_DrawBox equ LAFR_DrawBox
LA_FirstLabel equ LABX_FirstLabel
LA_LastLabel equ LABX_LastLabel
LA_LabelTable equ LABX_LabelTable
LA_Min equ LAFC_Min
LA_Max equ LAFC_Max
LA_Link equ LALV_Link
LA_Menu equ LAWN_Menu
LA_HistoryLines equ LAST_HistoryLines
LA_HistoryHook equ LAST_HistoryHook
LA_ReturnKey equ LABT_ReturnKey
LA_ExtraFat equ LABT_ExtraFat
LA_CursorKey equ LALV_CursorKey
STORE_BYTE equ TAG_USER+63
STORE_UBYTE equ TAG_USER+64
STORE_WORD equ TAG_USER+65
STORE_BOOL equ TAG_USER+65
STORE_UWORD equ TAG_USER+66
STORE_LONG equ TAG_USER+67
STORE_ULONG equ TAG_USER+68
STORE_STRPTR equ TAG_USER+69
STORE_FRACTION equ TAG_USER+68
LH_Font equ TAG_USER+41
LH_AutoActivate equ TAG_USER+42
LH_LocaleHook equ TAG_USER+4
LH_CloningPermitted equ TAG_USER+61
LH_EditHook equ TAG_USER+74
LH_ExactClone equ TAG_USER+75
LH_MenuGlyphs equ TAG_USER+76
LH_Parent equ TAG_USER+83
LH_BlockParent equ TAG_USER+84
LH_SimpleClone equ TAG_USER+90
LH_ExitFlush equ TAG_USER+108
LH_UserData equ TAG_USER+116
LH_RawKeyFilter equ TAG_USER+142
*****************************************************************************
; kinds of objects supported in addition to the normal GadTools kinds
HORIZONTAL_KIND equ 45
VERTICAL_KIND equ 46
END_KIND equ 47
FRAME_KIND equ 48
BOX_KIND equ 49
FRACTION_KIND equ 50
XBAR_KIND equ 51
YBAR_KIND equ 52
PASSWORD_KIND equ 53
GAUGE_KIND equ 54
TAPEDECK_KIND equ 55
LEVEL_KIND equ 56
BOOPSI_KIND equ 57
POPUP_KIND equ 58
*****************************************************************************
; in support of FRACTION_KIND gadgets
FIXED_UNITY equ 10000
*****************************************************************************
STRUCTURE LayoutHandle,0
APTR LH_Screen;
APTR LH_DrawInfo;
APTR LH_Window;
APTR LH_VisualInfo;
APTR LH_AmigaGlyph,
APTR LH_CheckGlyph;
APTR LH_UserData ; Requires gtlayout.library v9
APTR LH_Menu ; Requires gtlayout.library v13
LABEL LayoutHandle_SIZEOF;
*****************************************************************************
ENDC